package com.tianhui.consignortwofei.api;


import com.fgs.common.CommonResponse;
import com.fgs.common.entity.CommonDataListInfo;
import com.tianhui.consignortwofei.mvp.model.QuotationListBean;
import com.tianhui.consignortwofei.mvp.model.enty.BoHuiBodyBean;
import com.tianhui.consignortwofei.mvp.model.enty.DictionaryInfo;
import com.tianhui.consignortwofei.mvp.model.enty.DispatchDetailInfo;
import com.tianhui.consignortwofei.mvp.model.enty.DispatcherInfo;
import com.tianhui.consignortwofei.mvp.model.enty.DriverInfo;
import com.tianhui.consignortwofei.mvp.model.enty.FeedBackInfo;
import com.tianhui.consignortwofei.mvp.model.enty.FreightCalculationInfo;
import com.tianhui.consignortwofei.mvp.model.enty.GetZhuangCangBean;
import com.tianhui.consignortwofei.mvp.model.enty.GoodsInfo;
import com.tianhui.consignortwofei.mvp.model.enty.HeDanListBean;
import com.tianhui.consignortwofei.mvp.model.enty.OrderInfo;
import com.tianhui.consignortwofei.mvp.model.enty.QuoationPaiHaoBean;
import com.tianhui.consignortwofei.mvp.model.enty.SalesManInfo;
import com.tianhui.consignortwofei.mvp.model.enty.SourcePathInfo;
import com.tianhui.consignortwofei.mvp.model.enty.ToExamineInfo;
import com.tianhui.consignortwofei.mvp.model.enty.VehicleLimitInfo;
import com.tianhui.consignortwofei.mvp.model.enty.YuQiTipInfo;
import com.tianhui.consignortwofei.mvp.model.enty.evaluation.EvaluationInfo;
import com.tianhui.consignortwofei.mvp.model.enty.insure.InsureData;
import com.tianhui.consignortwofei.mvp.model.enty.insure.InsureQueryInfo;
import com.tianhui.consignortwofei.mvp.model.enty.insure.InsureTypeInfo;
import com.tianhui.consignortwofei.mvp.model.hetong.DuiXIangListBean;
import com.tianhui.consignortwofei.mvp.model.hetong.LiuChengListBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * api service
 */
public interface OrderApiService {


    //货源单列表
    @GET("smc/ordersource/list")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> sourceList(@QueryMap Map<String, String> map);

    //货源单列表(有定金)
    @GET("smc/nobillordersource/list")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> sourceListDingJin(@QueryMap Map<String, String> map);

    //询价单列表
    @GET("smc/orderrfqsource/list")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> inquirySourceList(@QueryMap Map<String, String> map);

    //调度单列表
    @GET("smc/ordersource/dispatchlist")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> dispatchList(@QueryMap Map<String, String> map);

    //调度单列表(有定金)
    @GET("smc/nobillordersource/dispatchlist")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> dispatchListDingJin(@QueryMap Map<String, String> map);


    //运费计算列表
    @GET("smc/ordersource/fclist")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> freightList(@QueryMap Map<String, String> map);

    //付款申请列表
    @GET("smc/ordersource/sublist")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> paymentList(@QueryMap Map<String, String> map);

//    //查看调度单明细信息
//    @GET("smc/ordersource/websiteordermodel")
//    Observable<CommonResponse<OrderInfo>> dispatchDetail(@QueryMap Map<String, String> map);

    //单据操作
    @POST("smc/ordersource/orderconfirm")
    Observable<CommonResponse> orderOperate(@QueryMap Map<String, String> map);

    //单据操作(有定金)
    @POST("smc/nobillordersource/orderconfirm")
    Observable<CommonResponse> orderOperateDingJin(@QueryMap Map<String, String> map);

    //终止单据，取消确认
    @POST("smc/ordersource/dispatchorderconfirm")
    Observable<CommonResponse> orderTerminateOperate(@QueryMap Map<String, String> map);

    //终止单据，取消确认(有定金)
    @POST("smc/nobillordersource/dispatchorderconfirm")
    Observable<CommonResponse> orderTerminateOperateDingJin(@QueryMap Map<String, String> map);

    //1 取单地 2 装货地 3 收货地信息列表
    @GET("smc/orderPlace/list")
    Observable<CommonResponse<CommonDataListInfo<SourcePathInfo>>> sourcePathList(@QueryMap Map<String, String> map);

    //1 取单地 2 装货地 3 收货地信息保存
    @POST("smc/orderPlace")
    Observable<CommonResponse> sourcePathSave(@QueryMap Map<String, String> map);

    //状态(16), 性别（29），账号状态（35），证件类型（53），物资名称（73），
    //状态信息（74），驾驶证类型（75），牌照类型（77），车牌颜色（78），车辆类型（81）
    //订单取消原因(82),
    //司机差评（3）司机中评（2）司机好评（1）
    //能源类型（2505） （准驾类型）2503
    //发送对象（2758）
    @GET("dict/listbypid")
    Observable<CommonResponse<List<DictionaryInfo>>> dictionaryList(@QueryMap Map<String, String> map);

    //车长吨位
    @GET("smc/orderrobconfig/listByType")
    Observable<CommonResponse<List<VehicleLimitInfo>>> vehicleLimitList();

    //投保类型
    @GET("sinoiov/insrueplan/getList")
    Observable<CommonResponse<List<InsureTypeInfo>>> insureTypeList();

    //发布货源
    @POST("smc/ordersource/websitesave")
    Observable<CommonResponse> publishSource(@Body GoodsInfo info);

    //销售员发布货源单
    @POST("smc/ordersource/saveSaleOrder")
    Observable<CommonResponse> publishLiteSource(@Body GoodsInfo info);


    //发布询价货源
    @POST("smc/orderrfqsource")
    Observable<CommonResponse> publishInquirySource(@Body GoodsInfo info);


    //销售员发布货源单(不开发票)
    @POST("smc/nobillordersource/saveSaleOrder")
    Observable<CommonResponse> publishLiteSourceBukai(@Body GoodsInfo info);


    //调整价格，重量
    @POST("smc/ordersource/orderconfirm")
    Observable<CommonResponse> orderAdjust(@QueryMap Map<String, String> map);

    //调整价格，重量(有订金)
    @POST("smc/nobillordersource/orderconfirm")
    Observable<CommonResponse> orderAdjustDingJin(@QueryMap Map<String, String> map);

    //调整卸车最早时间
    @POST("smc/ordersource/updateOrderunloadearltime")
    Observable<CommonResponse> unloadTimeAdjust(@QueryMap Map<String, String> map);

    //调整卸车最早时间(有订金)
    @POST("smc/nobillordersource/updateOrderunloadearltime")
    Observable<CommonResponse> unloadTimeAdjustDingJin(@QueryMap Map<String, String> map);

    //确认装车、收货
    @POST("smc/ordersource/updateweight")
    Observable<CommonResponse> orderConfirm(@QueryMap Map<String, String> map);

    //确认装车、收货(有订金)
    @POST("smc/nobillordersource/updateweight")
    Observable<CommonResponse> orderConfirmDingJin(@QueryMap Map<String, String> map);

    //承运司机详细信息
    @GET("smc/driver/driverAllModel")
    Observable<CommonResponse<DriverInfo>> driverInfo(@QueryMap Map<String, String> map);

    //调度明细列表
    @GET("smc/ordersource/dispatchorderauditlist")
    Observable<CommonResponse<List<DispatchDetailInfo>>> dispatchDetailList(@QueryMap Map<String, String> map);

    //货源明细列表
    @GET("smc/ordersource/orderauditlist")
    Observable<CommonResponse<List<DispatchDetailInfo>>> sourceDetailList(@QueryMap Map<String, String> map);

//    //货源明细列表(有订金)
//    @GET("smc/nobillordersource/orderauditlist")
//    Observable<CommonResponse<List<DispatchDetailInfo>>> sourceDetailListDingJin(@QueryMap Map<String, String> map);


    //发表评价
    @POST("smc/order/evaluate")
    Observable<CommonResponse> publishEvaluation(@Body EvaluationInfo info);

    //意见反馈提交
    @POST("smc/feedback")
    Observable<CommonResponse> feedBackCommit(@Body FeedBackInfo info);

    //司机违约
    @POST("smc/nobillordersource/websiteDeduction")
    Observable<CommonResponse> driverDefaultCommit(@QueryMap Map<String, String> map);

    //运费计算
    @POST("smc/fcsource")
    Observable<CommonResponse> freightCalculation(@Body FreightCalculationInfo info);

    //撤销运费计算
    @DELETE("smc/fcsource")
    Observable<CommonResponse> revokeFreightCalculation(@QueryMap Map<String, String> map);


    //投保查询
    @GET("sinoiov/insrue/getInsrueModel")
    Observable<CommonResponse<InsureQueryInfo>> insureQuery(@QueryMap Map<String, String> map);


    //修改发到货地址
    @POST("smc/ordersource/upadtePlaceCode")
    Observable<CommonResponse> changeDressAll(@QueryMap Map<String, String> map);

    //修改发到货地址(有定金)
    @POST("smc/nobillordersource/upadtePlaceCode")
    Observable<CommonResponse> changeDressAllDingjin(@QueryMap Map<String, String> map);



    //投保信息
    @POST("smc/ordersource/robOrderDetailsQuery")
    Observable<CommonResponse<InsureData>> insureInfo(@Body InsureQueryInfo info);

    //车辆路线
    @GET("sinoiov/vHisTrack24")
    Observable<CommonResponse> vehicleTrajectory(@QueryMap Map<String, String> map);

    //车辆app路线
    @GET("smc/appTrack")
    Observable<CommonResponse> getAppTrajectory(@QueryMap Map<String, String> map);

    //车辆实时定位
    @GET("sinoiov/vLastLocationV3")
    Observable<CommonResponse> vehicleLocation(@QueryMap Map<String, String> map);

    //货源单详情
    @GET("smc/ordersource")
    Observable<CommonResponse<OrderInfo>> orderDetail(@QueryMap Map<String, String> map);

    //货源单详情
    @GET("smc/ordersource/getOrderSourceModelByBillno")
    Observable<CommonResponse<OrderInfo>> orderSourceDetail(@QueryMap Map<String, String> map);

    //得到调度员用户信息根据货权信息
    @GET("smc/ordersource/dispatcheruserIdlist")
    Observable<CommonResponse<List<DispatcherInfo>>> dispatcherList(@QueryMap Map<String, String> map);

    //销售员列表
    @GET("user/SaleManDictList")
    Observable<CommonResponse<List<SalesManInfo>>> salesManList(@QueryMap Map<String, String> map);

    //查看订单明细信息
    @GET("smc/ordersource/getdispatchSourceModel")
    Observable<CommonResponse<OrderInfo>> dispatchDetail(@QueryMap Map<String, String> map);

    //调整运单图片信息
    @POST("smc/ordersource/websiteEditImg")
    Observable<CommonResponse> confirmLoadingChangePicture(@QueryMap Map<String, String> map);

    //调整运单图片信息
    @POST("smc/ordersource/updatePicture")
    Observable<CommonResponse> updateOrderPicture(@QueryMap Map<String, String> map);

    //找车单发货
    @POST("smc/searchcar")
    Observable<CommonResponse> sendFindCarList(@Body GoodsInfo info);

    //获取找车单
    @GET("smc/searchcar")
    Observable<CommonResponse<GoodsInfo>> getZhaoCheInfo(@QueryMap Map<String, String> map);

    //审核单列表
    @GET("smc/searchcar/listByDispatcherUserId")
    Observable<CommonResponse<CommonDataListInfo<ToExamineInfo>>> toExamine(@QueryMap Map<String, String> map);


    //逾期
    @GET("smc/ordersource/websiteorderfclist")
    Observable<CommonResponse<List<YuQiTipInfo>>> getYuQiTipList(@QueryMap Map<String, String> map);


    //销售找车单
    @GET("smc/searchcar/list")
    Observable<CommonResponse<CommonDataListInfo<ToExamineInfo>>> toExamineList(@QueryMap Map<String, String> map);


    //外部单
    @GET("smc/ordersource/listByBillType")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> externalList(@QueryMap Map<String, String> map);


    //非皓俊通单据操作
    @POST("smc/ordersource/robBillOrder")
    Observable<CommonResponse> sureExternalRequest(@QueryMap Map<String, String> map);



//    //外部单
//    @GET("smc/ordersource/listByBillType")
//    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> getXiaoShouName(@QueryMap Map<String, String> map);



    @POST("smc/searchcar/orderVerify")
    Observable<CommonResponse> boHuiZhaoChe(@Body BoHuiBodyBean info);

    //获取装车仓储费用
    @GET("smc/fcsource/getfcByDispatchno")
    Observable<CommonResponse<GetZhuangCangBean>> getZhuangCheCangChu(@QueryMap Map<String, String> map);


    //修改货权
    @POST("smc/searchcar/updateDispatcherUserId")
    Observable<CommonResponse> changeHuoQuan(@Body GoodsInfo info);


    //调整价格已抢单，运输中
    @POST("smc/ordersource/dispatchorderprice")
    Observable<CommonResponse> changePriceYunShu(@QueryMap Map<String, String> map);


    //转延长
    @POST("smc/searchcar/updateIsOut")
    Observable<CommonResponse> zhuanYanChang(@QueryMap Map<String, String> map);

    //确认取消单子
    @POST("smc/searchcar/updateIsTrue")
    Observable<CommonResponse> queRenDingDan(@QueryMap Map<String, String> map);

    //获取合单列表
    @GET("smc/ordersource/getDispatchOrderBillByDispatchno")
    Observable<CommonResponse<List<HeDanListBean>>> getHeDanList(@QueryMap Map<String, String> map);

    //提交合单列表
    @POST("smc/ordersource/saveDispatchOrderBill")
    Observable<CommonResponse> sendHeDanTrue(@Body List<HeDanListBean> allData);


    //合单删除
    @GET("smc/ordersource/deleteDispatchOrderBill")
    Observable<CommonResponse> heDanDelete(@QueryMap Map<String, String> map);

    //获取已发送重量
    @GET("smc/searchcar/getExistSearchOrderNew")
    Observable<CommonResponse> getAlreadySendWeight(@QueryMap Map<String, String> map);

    //销售已完成
    @GET("smc/ordersource/dispatchlist")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> dispatchSuccessList(@QueryMap Map<String, String> map);


    //已支付
    @GET("smc/ordersource/dispatchlistEnd")
    Observable<CommonResponse<CommonDataListInfo<OrderInfo>>> dispatchAlredyList(@QueryMap Map<String, String> map);

    //获取牌号
    @GET("plastics/user/listByUserId")
    Observable<CommonResponse<List<QuoationPaiHaoBean>>> getPaiHaoType(@QueryMap Map<String, String> map);



    //修改单个牌号
    @POST("plastics/quotation/saveQuotation")
    Observable<CommonResponse> savePaiHaoDangQian(@Body QuotationListBean.QuotationRecords.PlasticsQuotationListDTO info);




    //审核人列表
    @GET("user/getTreeDeptUser")
    Observable<CommonResponse<List<DuiXIangListBean>>> getShenHeList(@QueryMap Map<String, String> map);


    //流程显示
    @GET("contract/flow/getFlowList")
    Observable<CommonResponse<List<LiuChengListBean>>> getLiuChengList(@QueryMap Map<String, String> map);





}


